home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / fax / leffler / contrib / dialrules / dialrules-ger-fau.Z / dialrules-ger-fau
Encoding:
Text File  |  1994-10-04  |  5.1 KB  |  150 lines

  1. !
  2. ! FlexFAX Dialing String Processing Rules.
  3. !
  4. ! This file describes how to process user-specified dialing strings
  5. ! to create two items:
  6. !
  7. ! CanonicalNumber: a unique string that is derived from all dialing
  8. ! strings to the same destination phone number.  This string is used
  9. ! by the fax server for ``naming'' the destination. 
  10. !
  11. ! DialString: the string passed to the modem for use in dialing the
  12. ! telephone.  This string should be void of any characters that might
  13. ! confuse the modem.
  14. !
  15. ! Adapted for local use at FAU Erlangen-Nⁿrnberg
  16. !
  17. Internal        = "x"           ! internal call
  18. Company         = 85            ! our phone prefix
  19. Area            = 9131       ! local area code
  20. Country         = 49         ! local country code
  21. !
  22. External        = 09            
  23. LongDistance    = 0
  24. International   = 00
  25. Canonic         = "+"
  26. !
  27. INTERNAL        = "INTERNAL"
  28. LOCAL           = "LOCAL"
  29. LONGDISTANCE    = "LONGDISTANCE"
  30. INTERNATIONAL   = "INTERNATIONAL"
  31. !
  32. WS="     "            ! our notion of white space
  33. !
  34. ! Convert a phone number to a canonical format:
  35. !
  36. !    +<country><areacode><rest>
  37. !
  38. ! by (possibly) stripping off leading dialing prefixes for
  39. ! long distance and/or international dialing.
  40. !
  41. CanonicalNumber := [
  42. #.*            =            ! strip calling card stuff
  43. [^+0-9x]+        =            ! strip white space etc.
  44. ^${Internal}                                   = ${INTERNAL}
  45. ^${Company}                                    = ${INTERNAL}
  46. ^${LongDistance}${Area}${Company}              = ${INTERNAL}
  47. ^${International}${Country}${Area}${Company}   = ${INTERNAL}
  48. ^[+]${Country}${Area}${Company}                = ${INTERNAL}
  49. !
  50. ! local calls
  51. !
  52. ^[^0+IL]                                       = ${LOCAL}&
  53. ^${LongDistance}${Area}                        = ${LOCAL}
  54. ^${International}${Country}${Area}             = ${LOCAL}
  55. ^[+]${Country}${Area}                          = ${LOCAL}
  56. !
  57. ! long distance & international calls
  58. !
  59. ^${International}${Country}                    = ${LONGDISTANCE}
  60. ^${International}                              = ${INTERNATIONAL}
  61. ^${LongDistance}                               = ${LONGDISTANCE}
  62. ^[+]${Country}                                 = ${LONGDISTANCE}
  63. ^[+]                                           = ${INTERNATIONAL}
  64. !
  65. ! now construct appropriate canonical strings
  66. !
  67. ^${INTERNAL}      = ${Canonic}${Country}${Area}${Company}
  68. ^${LOCAL}         = ${Canonic}${Country}${Area}
  69. ^${LONGDISTANCE}  = ${Canonic}${Country}
  70. ^${INTERNATIONAL} = ${Canonic}
  71. ]
  72. !
  73. ! Process a dialing string according to local requirements.
  74. ! These rules do only one transformation: they convert in-country
  75. ! international calls to long-distance calls.
  76. !
  77. DialString := [
  78. [-${WS}.]+        =            ! strip syntactic sugar
  79. !
  80. ! internal calls
  81. !
  82. ^${Internal}                                   = ${INTERNAL}
  83. ^${Company}                                    = ${INTERNAL}
  84. ^${LongDistance}${Area}${Company}              = ${INTERNAL}
  85. ^${International}${Country}${Area}${Company}   = ${INTERNAL}
  86. ^[+]${Country}${Area}${Company}                = ${INTERNAL}
  87. !
  88. ! local calls
  89. !
  90. ^[^0+IL]                                       = ${LOCAL}&
  91. ^${LongDistance}${Area}                        = ${LOCAL}
  92. ^${International}${Country}${Area}             = ${LOCAL}
  93. ^[+]${Country}${Area}                          = ${LOCAL}
  94. !
  95. ! long distance & international calls
  96. !
  97. ^${International}${Country}                    = ${LONGDISTANCE}
  98. ^${International}                              = ${INTERNATIONAL}
  99. ^${LongDistance}                               = ${LONGDISTANCE}
  100. ^[+]${Country}                                 = ${LONGDISTANCE}
  101. ^[+]                                           = ${INTERNATIONAL}
  102. !
  103. ! now construct appropriate dialing strings
  104. !
  105. ^${INTERNAL}       = 
  106. ^${LOCAL}          = ${External}
  107. ^${LONGDISTANCE}   = ${External}${LongDistance}
  108. ^${INTERNATIONAL}  = ${External}${International}
  109. ]
  110. !
  111. ! Process a dialing string according to local requirements.
  112. ! These rules do only one transformation: they convert in-country
  113. ! international calls to long-distance calls.
  114. !
  115. ! Produce a display number
  116. !
  117. DisplayNumber := [
  118. [-${WS}.]+        =            ! strip syntactic sugar
  119. !
  120. ! internal calls
  121. !
  122. ^${Internal}                                   = ${INTERNAL}
  123. ^${Company}                                    = ${INTERNAL}
  124. ^${LongDistance}${Area}${Company}              = ${INTERNAL}
  125. ^${International}${Country}${Area}${Company}   = ${INTERNAL}
  126. ^[+]${Country}${Area}${Company}                = ${INTERNAL}
  127. !
  128. ! local calls
  129. !
  130. ^[^0+IL]                                       = ${LOCAL}&
  131. ^${LongDistance}${Area}                        = ${LOCAL}
  132. ^${International}${Country}${Area}             = ${LOCAL}
  133. ^[+]${Country}${Area}                          = ${LOCAL}
  134. !
  135. ! long distance & international calls
  136. !
  137. ^${International}${Country}                    = ${LONGDISTANCE}
  138. ^${International}                              = ${INTERNATIONAL}
  139. ^${LongDistance}                               = ${LONGDISTANCE}
  140. ^[+]${Country}                                 = ${LONGDISTANCE}
  141. ^[+]                                           = ${INTERNATIONAL}
  142. !
  143. ! now construct appropriate dialing strings
  144. !
  145. ^${INTERNAL}       = ${Internal}
  146. ^${LOCAL}          =  
  147. ^${LONGDISTANCE}   = ${LongDistance}
  148. ^${INTERNATIONAL}  = ${International}
  149. ]
  150.